<!DOCTYPE html>
<html lang="en">
<head>
    {% block head %}{% endblock %}
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="{{url_for('static',filename='img/meta.png')}}" type="image/x-icon"/>
    <title>{% block title %}{% endblock %}</title>
    {{ bootstrap.load_css() }}
    {{ bootstrap.load_js() }}
    <link rel="stylesheet" href="{{ url_for('static',filename='js/jquery_3.6.1.js') }}">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .top_nav {
            background-color: #dedcdc !important;
        }

        nav a.nav-link:hover {
            background-color: rgba(78, 252, 177, 0.78);
            font-weight: bold;
            border-radius: 8px;
            box-shadow: 1px 2px 1px 1px rgba(199, 239, 239, 0.53);
        }

        .navbar-dark .navbar-nav .nav-link {
            color: rgba(44, 159, 164, 0.5);
        }

        .text_box {
            position: absolute;
        }

        .navbar-dark .navbar-nav .nav-item a.active1 {
            color: #2275c6cf;
        }
    </style>
    {% block style %}
        <link rel="stylesheet" href="{{ url_for('static', filename = 'css/base.css') }}">
    {% endblock %}
</head>
<body>
{% block jumbotron_box %}
    <div class="jumbotron text-center top_jumbotron" style="margin-bottom:0;">
        <form class="form-inline" style="margin:auto;justify-content: flex-end">
            <input class="form-control" type="text" placeholder="暂未开发">
            <button class="btn btn-info" type="button">搜索</button>
        </form>
        <div class="text_box">
            <h1>坏柠博客网</h1>
        </div>
    </div>
{% endblock %}
<nav class="navbar navbar-expand-sm navbar-dark top_nav" id="nav_begin">
    <a class="navbar-brand display-1 text-dark" href="/">博客</a>
    <!-- Links -->
    <ul class="navbar-nav">
        <li class="nav-item">
            <a class="nav-link active1" href="/#nav_begin">首页</a>
        </li>
        {% if user %}
            {% if user.is_root %}
                <li class="nav-item">
                    <a class="nav-link" href="{{url_for('article.editer_article')}}">发布</a>
                </li>
            {% endif %}
        {% endif %}
        <li class="nav-item">
            <a class="nav-link" href="#">关于</a>
        </li>
    </ul>
    <div style="margin: auto;"></div>
    <ul class="navbar-nav ">
        {% if user %}
            <li class="nav-item">
                <a href="{{url_for('auth.alter',uuid=user.user_uuid)}}" class="nav-link">{{ user.username }}</a>
            </li>
            <li class="nav-item">
                <a href="{{ url_for('auth.logout') }}" class="nav-link">
                    注销
                </a>
            </li>
        {% else %}
            <li class="nav-item">
                <a class="nav-link" href="{{ url_for('auth.login') }}">登录</a>
            </li>
        {% endif %}
    </ul>
</nav>
{% block body %}
    <div class="container" style="margin-top:30px;max-width: 1300px">
        <div class="row">
            <div class="col-sm-3">
                {% block body_category %}
                    {#  侧边栏#}
                {% endblock %}
                <hr class="d-sm-none">
            </div>
            <div class="col-sm-9"
                 style="position: relative;top: 54px; border-right: #a3a3a3 solid 1px;border-left: #a3a3a3 solid 1px; padding: 10px">
                <div class="h_title">头条|TOPLIST</div>
                {% block body_article %}
                {% endblock %}
            </div>
        </div>
    </div>
{% endblock %}
{% block scripts %}
{% endblock %}
</body>
</html>